package com.esri.core.map;

import org.codehaus.jackson.JsonGenerator;

/* loaded from: classes.dex */
public class DynamicLayerInfo extends LayerInfo {
    private DrawingInfo a;
    private TimeOptions b;

    public DynamicLayerInfo(int i, DrawingInfo drawingInfo, LayerSource layerSource) {
        super(i, layerSource);
        this.a = drawingInfo;
    }

    public DynamicLayerInfo(int i) {
        this(i, null, new LayerMapSource(i));
    }

    public DynamicLayerInfo(int i, DrawingInfo drawingInfo) {
        this(i, drawingInfo, new LayerMapSource(i));
    }

    public void resetToDefault() {
        this.a = null;
        setLayerSource(new LayerMapSource(getId()));
    }

    public DrawingInfo getDrawingInfo() {
        return this.a;
    }

    public void setDrawingInfo(DrawingInfo drawingInfo) {
        this.a = drawingInfo;
    }

    public TimeOptions getLayerTimeOptions() {
        return this.b;
    }

    public void setLayerTimeOptions(TimeOptions timeOptions) {
        this.b = timeOptions;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // com.esri.core.map.LayerInfo
    public void toJson(JsonGenerator jsonGenerator) throws Exception {
        super.toJson(jsonGenerator);
        if (this.a != null) {
            jsonGenerator.writeFieldName("drawingInfo");
            jsonGenerator.writeRawValue(this.a.toJson());
        }
        if (this.b != null) {
            jsonGenerator.writeFieldName("layerTimeOptions");
            jsonGenerator.writeRawValue(this.b.toJson());
        }
    }

    public String toString() {
        return "DynamicLayerInfo [Drawing Info=" + this.a + ", Time Options=" + this.b + "]";
    }
}
